package com.example.shop.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* <p>
* 对商品评价进行评论
* </p>
*
* @author 作者
* @since 2022-05-29
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("r_evaluation_comments")
public class Comments extends Model<Comments> {

    private static final long serialVersionUID = 1L;

    @TableField(whereStrategy = FieldStrategy.NOT_EMPTY)
    //该评价的唯一标识
    private Long evaluationId;

    @TableId(value = "comments_id", type = IdType.ASSIGN_ID)
    //该评论的唯一标识
    private long commentsId;

    @TableField(whereStrategy = FieldStrategy.NOT_EMPTY)
    //评论的用户id
    private Long commentsUserId;
    //评论的内容
    private String commentsContent;

    @Override
    public String toString() {
        return "Comments{" +
                "evaluationId=" + evaluationId +
                ", commentsId=" + commentsId +
                ", commentsUserId=" + commentsUserId +
                ", commentsContent='" + commentsContent + '\'' +
                '}';
    }
}
